<div id="content">
<div class="col12">
	<table id="comanda" class="dataTable">
		<thead>
			<tr>
				<th><i class="icon-th"></i>Mesa</th>
				<th><i class="icon-dollar"></i>Preço Total</th>
				<th><i class="icon-stopwatch"></i>Início</th>
				<th><i class="icon-chef"></i>Status</th>
				<th><i class="icon-wallet"></i>Ações</th>
			</tr>
		</thead>
	</table>
</div>
</div>

<div id="form_comanda" class="col12" style="display: none;">
	<form id="fechar_form" action="comandas/fechar/<?=$this->session->userdata('login_usuario');?>" method="post" data-validate="parsley">
			<header><h2><i class="icon-calcdivide"></i>R$ <?='Total'//$total['total']?></h2></header>
		    <div>
		    
		    	<div>
		    		<label  for="dividir">Total</label>
		    		<div><h2>R$: <span id="total">24.65</span></h2></div>
		    	</div>
		    
		    	<div>
		    		<label  for="dividir">Dividir em</label>
		    		<div><input id="dividir" name="dividir" value="1" name="dividir" class="placeholder" data-required="true" type="text" /><h1><i id="mais" onclick="somar('dividir'); divi();" class="icon-plus verde"></i></h1><h1><i id="menos" onclick="subtrair('dividir'); divi();" class="icon-minus vermelho"></i></h1></div>
		    	</div>
			    <div>
			   		<label  for="qtde">Total dividido</label>
			    	<div><h2>R$: <span id="resultado"></span></h2></div>
			    </div>
			    <div>
			   		<div><button type="submit" class="submit touch" onclick="return confirmaFechar('+id+');" ><i class="icon-calcdivide"></i>Fechar</button></div>
			    </div>
			    
			    <script type="text/javascript">
					function divi(){
						var divisao = $('#total').text() / $('#dividir').val();
						console.log(divisao);
						$('#resultado').empty();
						$('#resultado').append(divisao);
					}
			    </script>
		    	
		    </div>
		</form>
</div>